package com.zhijian.medical.service;


import com.zhijian.medical.entity.po.ExperimentReport;
import com.zhijian.medical.entity.vo.request.ExperimentReportSearchVo;
import com.zhijian.medical.entity.vo.request.ExperimentReportUpdateVo;
import com.zhijian.medical.entity.vo.response.ExperimentReportListVo;
import com.zhijian.medical.entity.vo.response.ExperimentReportVo;
import com.zhijian.medical.entity.vo.response.ExperimentWithTemplateVo;
import com.zhijian.medical.util.Page;

import java.util.List;

/**
 * 实验报告 业务处理层
 *
 * @author HCG
 * @version 1.0
 * @date 2022-07-15 17:05:10
 */
public interface ExperimentReportService {

    /**
     * 主键查询
     *
     * @param id
     * @return
     */
    ExperimentReport selectById(Long id);

    /**
     * 主键查询vo
     *
     * @param id
     * @return
     */
    ExperimentReportVo selectVoById(Long id);

    /**
     * 查询ExperimentWithTemplateVo
     *
     * @param id
     * @return
     */
    ExperimentWithTemplateVo selectExperimentWithTemplateVoById(Long id);

    /**
     * 获取最新的
     *
     * @return
     */
    ExperimentReportVo selectNewestVo();

    /**
     * 按照主键删除
     *
     * @param id
     */
    void deleteById(Long id);

    /**
     * 根据类型与实验流程id进行删除
     *
     * @param type
     * @param experimentProcessId
     */
    void deleteByTypeAndExperimentProcessId(Byte type, Long experimentProcessId);

    /**
     * 新增
     *
     * @param experimentReport
     * @return
     */
    Long insert(ExperimentReport experimentReport);

    /**
     * 更改
     *
     * @param experimentReport
     * @return
     */
    boolean update(ExperimentReport experimentReport);

    /**
     * 修改
     *
     * @param experimentReportUpdateVo
     * @return
     */
    boolean update(ExperimentReportUpdateVo experimentReportUpdateVo);

    /**
     * 总数
     *
     * @param experimentReportSearchVo
     * @return
     */
    Integer count(ExperimentReportSearchVo experimentReportSearchVo);

    /**
     * 列表
     *
     * @param experimentReportSearchVo
     * @return
     */
    List<ExperimentReportVo> selectList(ExperimentReportSearchVo experimentReportSearchVo);

    /**
     * 分页查询
     *
     * @param experimentReportSearchVo
     * @return
     */
    Page<ExperimentReportVo> selectPage(ExperimentReportSearchVo experimentReportSearchVo);

    /**
     * 搜最新的
     *
     * @param experimentReportSearchVo
     * @return
     */
    ExperimentReportVo selectNewestVoBySearch(ExperimentReportSearchVo experimentReportSearchVo);

    /**
     * 批量新增数据（MyBatis原生foreach方法）
     *
     * @param entities List<ExperimentReport> 实例对象列表
     * @return 影响行数
     */
    boolean insertBatch(List<ExperimentReport> entities);

    /**
     * 根据搜索条件查询列表
     *
     * @param experimentReportSearchVo
     * @return
     */
    List<ExperimentReportListVo> selectExperimentReportListVoBySearch(ExperimentReportSearchVo experimentReportSearchVo);
}